#include <bits/stdc++.h>
using namespace std;
int solve_cube_work_iter(int m,int n){
    if(m == 0&& n == 0)
        return 1;
    int **Q=new int*[m+1];
    for(int i=0;i<=m;i++){
        Q[i]=new int[n+1]();
    }
    //初始化
    Q[0][0]=0;
    for(int j=1;j<=n;j++)
        Q[0][j]=1;
    for(int i=1;i<=m;i++)
        Q[i][0]=1;
    //迭代计算
    for(int i=1;i<=m;i++){
        for(int j=1;j<=n;j++){
            Q[i][j]=Q[i-1][j]+Q[i][j-1];
        }
    }
    int res=Q[m][n]/2;
    delete [] Q;
    return res;
}
int main()
{
    int m=1,n=1;
    int x1,y1,x2,y2;
    cin>>x1>>y1>>x2>>y2;
    m = abs(x1-x2);
    n = abs(y1-y2);
    cout<<solve_cube_work_iter(m,n);
}
